import {Order} from '../orderOk/order-model.js';
var order = new Order();
Page({
  data: {},
  onLoad(options) {
    this._loadData(options)
  },
  _loadData(options)
  {
    order.getOrderRentAndOrderProduct(options.id,(data)=>{
      this.setData({
        orderArr:data.data
      })
    })
  },

  rentOrder:function(e)
  {
    var id = e.currentTarget.dataset.id;
    my.navigateTo({
      url:"/pages/detailOrder/detailOrder?id="+id
    });
  },
  copy(e){
    console.log(e.target.dataset.text)
    my.setClipboard({
      text: e.target.dataset.text,
      success:function(){
        my.showToast({
          content:"复制成功"
        })
      }
    });
  }
});
